<div class="module">
    <h2><span>Пользователи</span></h2>
    <div id="users-table" class="module-table-body">
        <form action="<?php echo $action; ?>">
            <?php /*
                'filter'=>$this->widget('bootstrap.widgets.TbButtonGroup',array(
                            'type'=>'info',
                            'buttons'=>array(
                                array('label'=>'Action', 'url'=>'#'),
                                array('items'=>array(
                                    array('label'=>'Action', 'url'=>'#'),
                                    array('label'=>'Another action', 'url'=>'#'),
                                    array('label'=>'Something else', 'url'=>'#'),
                                    '---',
                                    array('label'=>'Separate link', 'url'=>'#'),
                                )),
                            ),
                        )),
            */ ?>

            <?php $this->widget('bootstrap.widgets.TbGridViewPlus',array(
                'type'=>'striped bordered condensed',
                'dataProvider'=>$dataProvider,
                'filter'=>$user,
                'columns'=>array(
                    array(
                        'name'=>'id',
                        'type'=>'raw',
                        'value'=>'$data->id',
                    ),
                    array(
                        'name'=>'userName',
                        'type'=>'raw',
                        'value'=>'CHtml::link(CHtml::encode($data->userName),
                            array("user/view/index","id"=>$data->id))',
                    ),
                    array(
                        'name'=>'email',
                        'type'=>'raw',
                        'value'=>'$data->email',
                    ),
                    array(
                        'name'=>'role',
                        'type'=>'raw',
                        'value'=>'$data->userRole',
                        'filter'=>CHtml::dropDownList('User[role]',$data,
                            User::$rolesNames,
                            array('empty'=>'')
                        ),
                    ),
                    array(
                        'name'=>'isActive',
                        'type'=>'raw',
                        'value'=>'$data->userStatus',
                        'filter'=>CHtml::dropDownList('User[isActive]',$data,
                            User::$statusNames,
                            array('empty'=>'')
                        ),
                    ),
                    array(
                        'name'=>'lastLoginTime',
                        'type'=>'raw',
                        'value'=>'$data->userActivity',
                        'filter'=>CHtml::dropDownList('User[lasLoginTime]',$data,
                            array(0=>'Онлайн','*'=>'Оффлайн'),
                            array('empty'=>'')
                        ),
                    ),
                    array(
                        'name'=>'dateVisit',
                        'type'=>'raw',
                        'value'=>'$data->statistics->lastVisit',
                    ),
                    array(
                        'name'=>'dateRegistered',
                        'type'=>'raw',
                        'value'=>'$data->registrationDate',
                    ),
                ),
            )); ?>
        </form>
    </div>
</div>
